package cn.maihe.elg.operation.repository.entity;

import cn.maihe.framework.starter.mybatis.mapper.Fn;
import cn.maihe.framework.starter.mybatis.mapper.PlusEntityWrapper;

public final class PermissionFuncDOCondition {
    private PlusEntityWrapper<PermissionFuncDO> ew;

    public PermissionFuncDOCondition() {
        this.ew = new PlusEntityWrapper(PermissionFuncDO.class);
    }

    public static PermissionFuncDOCondition builder() {
        return new PermissionFuncDOCondition();
    }

    public PlusEntityWrapper<PermissionFuncDO> build() {
        return this.ew;
    }

    public PermissionFuncDOCondition or() {
        this.ew.orNew();
        return this;
    }

    public PermissionFuncDOCondition and() {
        this.ew.andNew();
        return this;
    }

    private boolean isAndOr() {
        return ew.originalSql() == null || "".equals(ew.originalSql()) ? true : ew.originalSql().endsWith("AND ()") || ew.originalSql().endsWith("OR ()");
    }

    public void clear() {
        this.ew = null;
        this.ew = new PlusEntityWrapper(PermissionFuncDO.class);
    }

    public PermissionFuncDOCondition setSqlSelect(String sqlStr) {
        ew.setSqlSelect(sqlStr);
        return this;
    }

    public PermissionFuncDOCondition orderAsc(String column) {
        ew.orderBy(true, column, true);
        return this;
    }

    public PermissionFuncDOCondition orderDesc(String column) {
        ew.orderBy(true, column, false);
        return this;
    }

    public PermissionFuncDOCondition groupBy(String column) {
        ew.groupBy(column);
        return this;
    }

    public <E, R> PermissionFuncDOCondition orderAsc(Fn<E, R> fn) {
        ew.orderAsc(fn);
        return this;
    }

    public <E, R> PermissionFuncDOCondition orderDesc(Fn<E, R> fn) {
        ew.orderDesc(fn);
        return this;
    }

    public <E, R> PermissionFuncDOCondition groupBy(Fn<E, R> fn) {
        ew.groupBy(fn);
        return this;
    }

    public PermissionFuncDOCondition exists(String sqlStr) {
        ew.exists(sqlStr);
        return this;
    }

    public PermissionFuncDOCondition notExists(String sqlStr) {
        ew.notExists(sqlStr);
        return this;
    }

    public PermissionFuncDOCondition having(String sqlStr, Object... params) {
        ew.having(sqlStr, params);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdIsNull() {
        ew.isNull("permission_id");
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdIsNull() {
        if(!isAndOr()){
            ew.or();
        }
        ew.isNull("permission_id");
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdIsNotNull() {
        ew.isNotNull("permission_id");
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdIsNotNull() {
        if(!isAndOr()){
            ew.or();
        }
        ew.isNotNull("permission_id");
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdEq(Object value) {
        ew.eq("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdEq(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.eq("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdNe(Object value) {
        ew.ne("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdNe(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.ne("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdGt(Object value) {
        ew.gt("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdGt(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.gt("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdGe(Object value) {
        ew.ge("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdGe(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.ge("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdLt(Object value) {
        ew.lt("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdLt(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.lt("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdLe(Object value) {
        ew.le("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdLe(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.le("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdIn(Object... value) {
        ew.in("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdIn(Object... value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.in("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdNotIn(Object... value) {
        ew.notIn("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdNotIn(Object... value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.notIn("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdBetween(Object value, Object value1) {
        ew.between("permission_id", value, value1);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdBetween(Object value, Object value1) {
        if(!isAndOr()){
            ew.or();
        }
        ew.between("permission_id", value, value1);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdNotBetween(Object value, Object value1) {
        ew.notBetween("permission_id", value, value1);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdNotBetween(Object value, Object value1) {
        if(!isAndOr()){
            ew.or();
        }
        ew.notBetween("permission_id", value, value1);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdLike(String value) {
        ew.like("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdLike(String value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.like("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andPermissionIdNotLike(String value) {
        ew.notLike("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition orPermissionIdNotLike(String value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.notLike("permission_id", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlIsNull() {
        ew.isNull("func_url");
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlIsNull() {
        if(!isAndOr()){
            ew.or();
        }
        ew.isNull("func_url");
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlIsNotNull() {
        ew.isNotNull("func_url");
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlIsNotNull() {
        if(!isAndOr()){
            ew.or();
        }
        ew.isNotNull("func_url");
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlEq(Object value) {
        ew.eq("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlEq(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.eq("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlNe(Object value) {
        ew.ne("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlNe(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.ne("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlGt(Object value) {
        ew.gt("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlGt(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.gt("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlGe(Object value) {
        ew.ge("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlGe(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.ge("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlLt(Object value) {
        ew.lt("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlLt(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.lt("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlLe(Object value) {
        ew.le("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlLe(Object value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.le("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlIn(Object... value) {
        ew.in("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlIn(Object... value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.in("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlNotIn(Object... value) {
        ew.notIn("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlNotIn(Object... value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.notIn("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlBetween(Object value, Object value1) {
        ew.between("func_url", value, value1);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlBetween(Object value, Object value1) {
        if(!isAndOr()){
            ew.or();
        }
        ew.between("func_url", value, value1);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlNotBetween(Object value, Object value1) {
        ew.notBetween("func_url", value, value1);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlNotBetween(Object value, Object value1) {
        if(!isAndOr()){
            ew.or();
        }
        ew.notBetween("func_url", value, value1);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlLike(String value) {
        ew.like("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlLike(String value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.like("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition andFuncUrlNotLike(String value) {
        ew.notLike("func_url", value);
        return this;
    }

    public PermissionFuncDOCondition orFuncUrlNotLike(String value) {
        if(!isAndOr()){
            ew.or();
        }
        ew.notLike("func_url", value);
        return this;
    }
}
